package com.iot08.common.entity.app;

import com.iot08.common.entity.admin.SysUser;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
@Document("iot_card_info")
public class IotCardInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @Field("_id")
    private String id;

    private String cardNum;

    private String vendor;

    private String operator;

    private Long simId;

    /*
            "c" : {
                    "10086" : {
                            "t" : NumberLong(1710814848),
                            "phone" : "10086",
                            "name" : "白名单0086"
                    }
            }
        */
    @Field("c")
    private Map<String, Map<String, Object>> contactMap;

    public Map<String, Map<String, Object>> getContactMap() {
        if(contactMap == null){
            contactMap = new HashMap<>();
        }
        return contactMap;
    }

    private Map<String, Object> vendorCardInfo;


}
